package com.diaohw.module.system.obj.mapstruct;

import com.diaohw.module.system.obj.dto.AccountInsertDto;
import com.diaohw.module.system.obj.dto.AccountUpdateDto;
import com.diaohw.module.system.obj.entity.Account;
import com.diaohw.module.system.obj.vo.AccountVo;
import com.diaohw.platform.remote.auth.obj.bo.AccountBO;
import com.diaohw.platform.remote.auth.obj.bo.AccountSaltBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * <p>
 * 用户 类型转换
 * </p>
 *
 * @author D-Hw
 * @since 2024-07-05
 */
@Mapper
public interface AccountMapstruct {

    AccountMapstruct INSTANCE = Mappers.getMapper(AccountMapstruct.class);

    /**
     * dto to entity
     */
    Account dtoToEntity(AccountInsertDto dto);

    Account dtoToEntity(AccountUpdateDto dto);

    /**
     * entity to dto
     */
    AccountInsertDto entityToDto(Account entity);


    /**
     * entity to vo
     */
    AccountVo entityToVo(Account entity);
    AccountBO entityToBo(Account entity);


    List<AccountSaltBO> entityToSalt(List<Account> list);
}

